<script src="@/js/culture/liushisigua.js"></script>

<template>
  <div class="liushisigua" id="app">
    <div class="margins">

      <!-- 导航 -->
      <el-affix>
        <div class="affix">
          <Breadcrumb separator=">">
            <span v-for="item in navigations" :key="item">
              <BreadcrumbItem :to="item.link">
                <Icon :type="item.icon" />
                {{ item.title }}
              </BreadcrumbItem>
            </span>
          </Breadcrumb>
        </div>
        <div class="divider">
          <el-divider />
        </div>
      </el-affix>

      <!-- 数据 -->
      <div class="data">

        <el-row :gutter="15">
          <el-col :span="21">
            <el-card shadow="always" class="card1">

              <el-row :gutter="40">
                <el-col :span="12">
                  <el-card shadow="never" class="option-card">
                    <div class="title" @click="pageTable = 0">
                      基本介绍
                      <span v-show="pageTable === 0">
                        <Icon type="ios-arrow-dropdown-circle" />
                      </span>
                    </div>
                  </el-card>
                </el-col>
                <el-col :span="12">
                  <el-card shadow="never" class="option-card">
                    <div class="title" @click="pageTable = 1">
                      详细解读
                      <span v-show="pageTable === 1">
                        <Icon type="ios-arrow-dropdown-circle" />
                      </span>
                    </div>
                  </el-card>
                </el-col>
              </el-row>

              <div class="content">
                <div v-show="pageTable === 0">

                  <div>
                    <el-tag round type="info" effect="dark">
                      <span>何谓六十四卦？</span>
                    </el-tag>
                  </div>
                  <div>
                    <div>六十四卦是透过八卦与八卦的组合，去反应六十四种不同的事务、情境、现象、特定环境下的人生哲理、以及大自然的运作法则。</div>
                    <div>每一卦都会有六爻和爻辞，每卦六爻，共三百八十四爻，加上乾、坤两卦各有一用爻，共三百八十六种对应的状态，透过这些变化可以知道世间万物的运作以及人生的哲理。</div>
                  </div>
                  <br />
                  <div>
                    <el-tag round type="info" effect="dark">
                      <span>六十四卦的起源</span>
                    </el-tag>
                  </div>
                  <div>
                    <div>
                      <div>六十四卦的起源可以追溯到中国古代的《易经》，是中华民族传统思想文化中自然哲学与人文实践的理论根源，被誉为“大道之源”。</div>
                    </div>
                  </div>
                  <br />
                  <div>
                    <el-tag round type="info" effect="dark">
                      <span>六十四卦的形成</span>
                    </el-tag>
                  </div>
                  <div>
                    <div>
                      据《史记·周本纪》记载，六十四卦最初是由周文王（西伯昌）在囚禁期间，通过潜心研究易学八卦，将八卦相叠推演而来。西伯昌被崇侯虎陷害而被殷帝纣囚禁在羑里七年，在此期间创立了六十四卦，包括乾为天、坤为地、水雷屯、山水蒙等。这些卦象代表了宇宙万物的变化与规律，体现了古代汉民族的思想与智慧。
                    </div>
                  </div>

                </div>
                <div v-show="pageTable === 1">

                  <div>
                    <span>
                      <el-autocomplete size="small" maxlength="3" show-word-limit value-key="name" :debounce="300"
                        v-model="queryData" :fetch-suggestions="querySearch" @click.native="pageData2" clearable
                        placeholder="请输入六十四卦名称（如：乾卦）" style="width:260px;">
                        <template #prefix>
                          <el-icon class="el-input__icon">
                            <search />
                          </el-icon>
                        </template>
                        <template #default="{ item }">
                          <span v-html="brightenKeyword(item.name, queryData) "></span>
                        </template>
                      </el-autocomplete>
                    </span>
                    <span>
                      &nbsp;
                      <Button size="small" icon="ios-search" @click="">搜索</Button>
                    </span>
                    <span class="page">
                      <el-pagination small background class="pageList" :pager-count="3"
                        :page-sizes="[10, 20, 30, 50, 100]" layout="total, sizes, prev, pager, next, jumper"
                        :total="dataTotal" :current-page.sync="page" :page-size="pageSize"
                        @size-change="handleSizeChange" @current-change="handleCurrentChange">
                      </el-pagination>
                    </span>
                  </div>

                  <div class="divider">
                    <el-divider />
                  </div>

                  <div v-show="data && data.length !== 0">
                    <div v-for="item in data" :key="item" class="for">
                      <el-card shadow="hover">
                        <div class="name">【<b v-html="showDataMethod(item.name)"></b>】</div>

                        <div class="gua">
                          <div class="naming">
                            <span class="ym">爻名</span>
                            <span class="gx">卦象</span>
                            <span class="yc">爻辞</span>
                          </div>
                          <div class="yao-name" v-if="item.yaoName">
                            <div v-for="index in sixGuaIndex.length" :key="index">
                              {{ item.yaoName.split('.')[sixGuaIndex[index - 1]] }}
                            </div>
                          </div>
                          <div class="yao-as" v-if="item.guaAs">
                            <div>{{ item.guaAs }}</div>
                          </div>
                          <div class="yao-ci" v-if="item.yaoCi">
                            <div v-for="index in sixGuaIndex.length" :key="index">
                              <b>{{ item.yaoCi.split('.')[sixGuaIndex[index - 1]] }}</b>
                            </div>
                          </div>
                        </div>

                        <!-- <div>
                        <b>卦象：</b>
                        {{ item.guaAs }}
                        <el-tooltip class="box-item" effect="dark" placement="right">
                          <template #content>
                            <div style="zoom: 5; margin: 7px 0 5px 0;">
                              {{ item.guaAs }}
                            </div>
                          </template>
                          <a :href="searchLink + item.name" target="_blank">
                            <Icon type="ios-search" />
                          </a>
                        </el-tooltip>
                      </div> -->

                        <div style="float: left; margin-top: -25px;">
                          <div>
                            <b>特点：</b>
                            {{ item.characteristic }}
                          </div>
                          <div>
                            <b>含义：</b>
                            {{ item.meaning }}
                          </div>
                        </div>

                        <br />
                        <!-- <div>
                        <b>万物类象：</b>
                        <div class="leixiang">
                          <span v-for="lx in item.leiXiang.length" :key="lx">
                            {{ item.leiXiang.split("#")[lx] }}
                          </span>
                        </div>
                      </div> -->
                        <div class="index">
                          {{ item.id }}
                        </div>
                      </el-card>
                    </div>
                  </div>
                  <div v-show="data.length === 0" class="null">
                    暂无数据
                  </div>

                </div>
              </div>

            </el-card>
          </el-col>

          <el-col :span="3">
            <el-card shadow="never" class="card2">
              <div class="header">
                更多
              </div>

              <div class="selest">
                <div v-for="item in mores" :key="item" class="item">
                  <router-link :to="item.link">
                    <div class="title">
                      <Icon type="ios-arrow-dropright" />
                      {{ item.title }}
                    </div>
                  </router-link>

                </div>

                <div class="plan">
                  敬请期待 ...
                </div>
              </div>
            </el-card>
          </el-col>

        </el-row>

      </div>

    </div>
  </div>
</template>

<style scoped lang="less" src="@/css/culture/liushisigua.scss"></style>
